<template>
  <div class="chart-wrapper">
    <div class="title">{{ title }}</div>
    <div class="chart">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'echartsCommon',
  props: ['title'],
  data() {
    return {}
  },
}
</script>

<style scoped lang="scss">
.chart-wrapper {
  background: #fff;
  padding: 16px 16px 0;
  margin-bottom: 20px;
  border-radius: 20px;
  box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
  border-color: rgba(0, 0, 0, .05);
  .title {
    font-size: 16px;
    font-weight: 600;
    height: 30px;
    line-height: 30px;
    margin-bottom: 10px;
    color: #333333;
    font-weight: bold;
    position: relative;
    text-indent: 15px;
    &::before {
      width: 6px;
      height: 20px;
      background: #81bbff;
      position: absolute;
      top: 5px;
      left: 0;
      content: "";
    }
  }
}
@media (max-width:1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}
</style>
